package com.ajieee.merge.event;

import com.ajieee.merge.entity.sys.po.UserPO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

/**
 * @author ajieee
 * @date 2025-10-25
 */
@Slf4j
@Component
public class LoginSuccessEventListener {

	@EventListener(LoginSuccessEventListener.class)
	public void handleLoginSuccessEvent(LoginSuccessEvent event) {
		UserPO user = event.getUserPO();
		log.info("用户登录成功：{}, token: {}", user.getUsername(), event.getToken());
	}

}
